#!/bin/bash
:<< !
runing environment:
	1. need install maven environment, version:3.6.1
	2. need set java enrionment, version 1.8
	3. config /etc/envrionment ,java home, path, classpath, maven_home,
	
notice:
	1. integrated cases need mvn compile success
	2. directory contains blank space,directory need quoted with "" 

python script call this bat format like:
	mavenRunAllCase.sh /home/test/java_workspace/testokhttp ./logfile.txt ./applog.txt

all command like below:
	mvn test
	
bat script params:
	1. workspace: the test project directory
	2. logFile: execute test log stored to this file
	3. appLogFile: be tested soft's log stored to this file

return:
    0: execute normally
    1: execute unnormally
	
!

echo show $1,$2,$3
workspace=$1
logFile=$2
appLogFile=$3
echo change workspace to $workspace
cd $workspace
mvn test > $logFile 2>&1

echo shell exit with status $?
exit $?